<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <!-- Object.keys()、Object.values()、Object.entries() -->
  <script>
    let vue = {
      data: "数据",
      el: '元素',
      uname: ['methods', 'created']
    }
    //  遍历对象
    // for(var key in vue){
    //   console.log('key',key);
    //   console.log('属性值',vue[key]);
    // }
    console.log(Object.keys(vue));
    console.log(Object.values(vue));
    console.log(Object.entries(vue));

    // 对象的简写  当键名和键值一样的时候，就写一个键名就可以了
    var age = 20
    // let router={
    //    age:age,
    //    say:function(){
    //     console.log('11111111');
    //    }
    // }
    let router = {
      age,
      say() {
        console.log('11111111');
      }
    }
    console.log('router', router.age);
    router.say()
  </script>
</body>

</html>